﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RemoteData.model
{
    public class UpdateStatus
    {
        public UpdateStatus()
        {
            updateFlag = false;
            status = 0;
        }

        public UpdateStatus(UpdateStatus s)
        {
            this.updateFlag = s.updateFlag;
            this.status = s.status;
        }

        public UpdateStatus Clone()
        {
            return new UpdateStatus(this);
        }

        public bool updateFlag;//是否刷新
        public int status;//状态，0:波长的波动值没有超过设定值，1:波长的波动值超过了设定值
    }

    public class UpdateStatusViewModel : ViewModelBase
    {
        public UpdateStatusViewModel()
        {
            updateFlag = false;
            status = 0;
        }

        public UpdateStatusViewModel(UpdateStatusViewModel s)
        {
            this.updateFlag = s.updateFlag;
            this.status = s.status;
        }

        public UpdateStatusViewModel Clone()
        {
            return new UpdateStatusViewModel(this);
        }

        //是否刷新
        private bool m_updateFlag;
        public bool updateFlag
        {
            get { return m_updateFlag; }
            set
            {
                this.m_updateFlag = value;
                NotifyPropertyChanged();
            }
        }

        //状态，0:正常，1:异常
        private int m_status;
        public int status
        {
            get { return m_status; }
            set
            {
                this.m_status = value;
                NotifyPropertyChanged();
            }
        }
    }
}
